package com.ourteam.workspace.domain;
/**
 * Template Name : DTO数据对象
 * Template Version : 1
 * Template Last Modfiy Date : Fri Nov 30 16:49:33 CST 2018
 * Auto Generate Date : 2018-11-30 16:50:02
  * Warning ! This file will be overwrite when regenerate !
  * 
 */

import java.util.Map;
import java.util.HashMap;
import org.apache.commons.lang.ArrayUtils;
import org.apache.commons.beanutils.BeanMap;
import net.dao.IDataPopulateCallback;


public class WorkspaceScmConfigBean implements java.io.Serializable {

        
	private static Map<String,String> mappedDaoFields = new HashMap<String,String>();
    
	private com.ourteam.workspace.dao.WorkspaceScmConfig workspaceScmConfig;

	protected BeanMap getBeanMap(){
	
		return new BeanMap(workspaceScmConfig);
	}
	
	static{
				
												
		mappedDaoFields.put("id",com.ourteam.workspace.dao.IWorkspaceScmConfigDAO.Id);
		
																																																						
				
																
		mappedDaoFields.put("workspaceId",com.ourteam.workspace.dao.IWorkspaceScmConfigDAO.WorkspaceId);
		
																																																		
				
																				
		mappedDaoFields.put("scmType",com.ourteam.workspace.dao.IWorkspaceScmConfigDAO.ScmType);
		
																																														
				
																								
		mappedDaoFields.put("protocol",com.ourteam.workspace.dao.IWorkspaceScmConfigDAO.Protocol);
		
																																										
				
																												
		mappedDaoFields.put("hostName",com.ourteam.workspace.dao.IWorkspaceScmConfigDAO.HostName);
		
																																						
				
																																
		mappedDaoFields.put("hostPort",com.ourteam.workspace.dao.IWorkspaceScmConfigDAO.HostPort);
		
																																		
				
																																				
		mappedDaoFields.put("module",com.ourteam.workspace.dao.IWorkspaceScmConfigDAO.Module);
		
																														
				
																																								
		mappedDaoFields.put("scmUser",com.ourteam.workspace.dao.IWorkspaceScmConfigDAO.ScmUser);
		
																										
				
																																												
		mappedDaoFields.put("scmPassword",com.ourteam.workspace.dao.IWorkspaceScmConfigDAO.ScmPassword);
		
																						
				
																																																
		mappedDaoFields.put("status",com.ourteam.workspace.dao.IWorkspaceScmConfigDAO.Status);
		
																		
				
																																																				
		mappedDaoFields.put("remarks",com.ourteam.workspace.dao.IWorkspaceScmConfigDAO.Remarks);
		
														
				
																																																								
		mappedDaoFields.put("branch",com.ourteam.workspace.dao.IWorkspaceScmConfigDAO.Branch);
		
										
				
																																																												
		mappedDaoFields.put("label",com.ourteam.workspace.dao.IWorkspaceScmConfigDAO.Label);
		
						
				
				
	}
	
	public static String getMappedDAOField(String aAttrName){
		return mappedDaoFields.get(aAttrName);
	}
	
	
	public WorkspaceScmConfigBean() {
		super();
	    		
		this.workspaceScmConfig = new com.ourteam.workspace.dao.WorkspaceScmConfig();
                
	}
	
		
	public WorkspaceScmConfigBean(com.ourteam.workspace.dao.WorkspaceScmConfig workspaceScmConfig) {
		super();
	
		this.workspaceScmConfig = workspaceScmConfig;
		
	}
		
		
		
    	
	public com.ourteam.workspace.dao.WorkspaceScmConfig convertToWorkspaceScmConfig(){
		return this.workspaceScmConfig;
	}
	
	public com.ourteam.workspace.dao.WorkspaceScmConfig convertTo(){
		return this.workspaceScmConfig;
	}
	
			
		
			
			
		
	/**
	 * Get id
	 * 
	 * @return long
	 */
	public long getId(){
		return (long) this.workspaceScmConfig.getId();
	}
	
	/**
	 * Set id
	 * 
	 * @parameter long
	 */
	public void setId(long id){
		
		this.workspaceScmConfig.setId(id);
	}
		
																											
		
		
					
			
		
	/**
	 * Get workspaceId
	 * 
	 * @return long
	 */
	public long getWorkspaceId(){
		return (long) this.workspaceScmConfig.getWorkspaceId();
	}
	
	/**
	 * Set workspaceId
	 * 
	 * @parameter long
	 */
	public void setWorkspaceId(long workspaceId){
		
		this.workspaceScmConfig.setWorkspaceId(workspaceId);
	}
		
																									
		
		
							
			
		
	/**
	 * Get scmType
	 * 
	 * @return String
	 */
	public String getScmType(){
		return (String) this.workspaceScmConfig.getScmType();
	}
	
	/**
	 * Set scmType
	 * 
	 * @parameter String
	 */
	public void setScmType(String scmType){
		
		this.workspaceScmConfig.setScmType(scmType);
	}
		
																							
		
		
									
			
		
	/**
	 * Get protocol
	 * 
	 * @return String
	 */
	public String getProtocol(){
		return (String) this.workspaceScmConfig.getProtocol();
	}
	
	/**
	 * Set protocol
	 * 
	 * @parameter String
	 */
	public void setProtocol(String protocol){
		
		this.workspaceScmConfig.setProtocol(protocol);
	}
		
																					
		
		
											
			
		
	/**
	 * Get hostName
	 * 
	 * @return String
	 */
	public String getHostName(){
		return (String) this.workspaceScmConfig.getHostName();
	}
	
	/**
	 * Set hostName
	 * 
	 * @parameter String
	 */
	public void setHostName(String hostName){
		
		this.workspaceScmConfig.setHostName(hostName);
	}
		
																			
		
		
													
			
		
	/**
	 * Get hostPort
	 * 
	 * @return String
	 */
	public String getHostPort(){
		return (String) this.workspaceScmConfig.getHostPort();
	}
	
	/**
	 * Set hostPort
	 * 
	 * @parameter String
	 */
	public void setHostPort(String hostPort){
		
		this.workspaceScmConfig.setHostPort(hostPort);
	}
		
																	
		
		
															
			
		
	/**
	 * Get module
	 * 
	 * @return String
	 */
	public String getModule(){
		return (String) this.workspaceScmConfig.getModule();
	}
	
	/**
	 * Set module
	 * 
	 * @parameter String
	 */
	public void setModule(String module){
		
		this.workspaceScmConfig.setModule(module);
	}
		
															
		
		
																	
			
		
	/**
	 * Get scmUser
	 * 
	 * @return String
	 */
	public String getScmUser(){
		return (String) this.workspaceScmConfig.getScmUser();
	}
	
	/**
	 * Set scmUser
	 * 
	 * @parameter String
	 */
	public void setScmUser(String scmUser){
		
		this.workspaceScmConfig.setScmUser(scmUser);
	}
		
													
		
		
																			
			
		
	/**
	 * Get scmPassword
	 * 
	 * @return String
	 */
	public String getScmPassword(){
		return (String) this.workspaceScmConfig.getScmPassword();
	}
	
	/**
	 * Set scmPassword
	 * 
	 * @parameter String
	 */
	public void setScmPassword(String scmPassword){
		
		this.workspaceScmConfig.setScmPassword(scmPassword);
	}
		
											
		
		
																					
			
		
	/**
	 * Get status
	 * 
	 * @return String
	 */
	public String getStatus(){
		return (String) this.workspaceScmConfig.getStatus();
	}
	
	/**
	 * Set status
	 * 
	 * @parameter String
	 */
	public void setStatus(String status){
		
		this.workspaceScmConfig.setStatus(status);
	}
		
									
		
		
																							
			
		
	/**
	 * Get remarks
	 * 
	 * @return String
	 */
	public String getRemarks(){
		return (String) this.workspaceScmConfig.getRemarks();
	}
	
	/**
	 * Set remarks
	 * 
	 * @parameter String
	 */
	public void setRemarks(String remarks){
		
		this.workspaceScmConfig.setRemarks(remarks);
	}
		
							
		
		
																									
			
		
	/**
	 * Get branch
	 * 
	 * @return String
	 */
	public String getBranch(){
		return (String) this.workspaceScmConfig.getBranch();
	}
	
	/**
	 * Set branch
	 * 
	 * @parameter String
	 */
	public void setBranch(String branch){
		
		this.workspaceScmConfig.setBranch(branch);
	}
		
					
		
		
																											
			
		
	/**
	 * Get label
	 * 
	 * @return String
	 */
	public String getLabel(){
		return (String) this.workspaceScmConfig.getLabel();
	}
	
	/**
	 * Set label
	 * 
	 * @parameter String
	 */
	public void setLabel(String label){
		
		this.workspaceScmConfig.setLabel(label);
	}
		
			
		
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
	
	public int hashCode() {
   		return org.apache.commons.lang.builder.HashCodeBuilder.reflectionHashCode(this);
 	}
	
		
	public boolean equals(Object obj) {
		if (obj == null) {
            return false;
        } // end if

        if ((obj instanceof WorkspaceScmConfigBean) == false) {
            return false;
        } // end if

        WorkspaceScmConfigBean other = (WorkspaceScmConfigBean) obj;
        
        boolean isEqual = false;
        
                
        com.ourteam.workspace.dao.WorkspaceScmConfig tempWorkspaceScmConfig = other.convertToWorkspaceScmConfig();
        
        if(tempWorkspaceScmConfig == null || this.workspaceScmConfig == null){
        	isEqual = false;
        }
        else if(tempWorkspaceScmConfig == this.workspaceScmConfig || tempWorkspaceScmConfig.equals(this.workspaceScmConfig) ){
        	isEqual = true;
        }
        else{
        	isEqual = false;
        }
        
        return isEqual;
	}
	
	
	public static WorkspaceScmConfigBean[] toArray(com.ourteam.workspace.dao.WorkspaceScmConfig[] aWorkspaceScmConfigs){
		
		return toArray(aWorkspaceScmConfigs,null);
	}
	
	public static WorkspaceScmConfigBean[] toArray(com.ourteam.workspace.dao.WorkspaceScmConfig[] aWorkspaceScmConfigs , IDataPopulateCallback aCallBack){
		 
		 if(ArrayUtils.isEmpty(aWorkspaceScmConfigs)){
		 	return new WorkspaceScmConfigBean[0];
		 }
		 
		 int length = aWorkspaceScmConfigs.length;
		 
		 WorkspaceScmConfigBean[] beans = new WorkspaceScmConfigBean[length];
		  
		 for (int i = 0; i < length; i++) {
			beans[i] = new WorkspaceScmConfigBean(aWorkspaceScmConfigs[i]);
			if(aCallBack != null){
			    aCallBack.populate(beans[i],new Object[]{aWorkspaceScmConfigs[i]});
			}
		 }
		 
		 return beans;
	 }
	 
	 	 
}